\documentclass[tikz,border=2mm]{standalone}
\usepackage{array,amsmath,mathptmx,xcolor,bbding,pifont,colortbl}
\usepackage[UTF8]{ctex}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
% 只需要这个就可以
\usepackage[thicklines]{cancel}
% 可以设置线条颜色，默认是黑色
\usepackage{xcolor}
\usepackage{tikz-cd}
\usepackage{tikz,graphicx,subfig,caption} % Required for drawing custom shapes
\usetikzlibrary{fit,matrix,chains,arrows,shapes,positioning,arrows.meta,chains,shadows,shapes.callouts,decorations.text,shapes.symbols,shapes.misc, positioning,decorations.pathreplacing,calc,backgrounds}

% 额外添加
\usepackage{indentfirst}
\usepackage{diagbox} 
\usepackage{ulem}
\usepackage{cancel}

\begin{document} 
	\begin{tikzpicture}[>=latex,every node/.style={anchor=south west,,inner sep=0,fill=white}]
		\draw[->] (-2em,0) -- (5em,0em);
		
		\node(tag1)[draw,inner sep=0.5em, anchor=south, fill=white] at (10em,0.5em){识别单词};
		\node(tag2)[draw,inner sep=0.5em, anchor=north, fill=white] at (10em,-0.5em){生成机内表示};
		
		\node(tag3)[anchor=south, fill=white] at (1.5em,0.2em){源程序};
		\node(tag4)[anchor=south, fill=white] at (18.5em,0.2em){单词Token序列};
		\node(tag5)[anchor=south, fill=white] at ([xshift=-2.2em,yshift=0.4em]tag1.north){词法分析};
		
		\draw[->] (15em,0em) -- (22em,0em);
		
		\begin{pgfonlayer}{background}
			\node [draw, densely dashed,fill=white,fit=(tag1)(tag2),inner xsep=1.3em, inner ysep= 2em] {};
		\end{pgfonlayer}
	\end{tikzpicture}
\end{document}
